/*
 * ***** BEGIN LICENSE BLOCK *****
 * Version: MPL 1.1
 *
 * The contents of this file are subject to the Mozilla Public License Version
 * 1.1 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * The Original Code is
 *
 * java-concurrency-presentation:
 * concurrency presentation tutorial.
 *
 * The Initial Developer of the Original Code is
 * Marco Antonio Villalobos, Jr.
 * Portions created by the Initial Developer are Copyright (C) 2010
 * the Initial Developer. All Rights Reserved.
 *
 * Contributor(s): None.
 *
 * ***** END LICENSE BLOCK *****
 */

package presentation.concurrency.indexer;

import java.util.Set;

/**
 * Represents a word that was indexed.
 */
public interface Word {

    /**
     * Adds an occurrence of this word.
     *
     * This should somehow create a Location, and add it a data-structure containing Locations.
     *
     * @param file The file containing the word.
     * @param line The line in this file where that word occurred.
     */
    void add(String file, int line);

    /**
     * Retrieve the amount of times this word was added.
     *
     * @return The amount of times that a word occurred.
     */
    long getCount();

    /**
     * Retrieves the set of locations explaining where this word occurred.
     *
     * @return A set of locations.
     */
    Set<Location> getLocations();
}
